package April._25.homework.work3;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStreamReader;
import java.lang.reflect.Method;
import java.util.Properties;

public class Main {
    public static void main(String[] args) throws IOException, InstantiationException, IllegalAccessException, ClassNotFoundException, NoSuchMethodException {
        //创建一个空属性列表
        Properties properties = new Properties();
        properties.load(new InputStreamReader(new FileInputStream("fileTest\\config.properties")));
        String className = properties.getProperty("className");
        String methodName = properties.getProperty("methodName");
        //获取字节码文件
        Class<?> aClass = Class.forName(className);
        //实例化
        Object o = aClass.newInstance();
        //获取指定的方法
        Method method = aClass.getDeclaredMethod(methodName);
    }
}
